package com.textbasedgame.intro;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Text {

	private static final String TERM_ARROW = ">";
	public String enter = null;
	
	public Text() {
	}

	public void play() {
		System.out.println ("You are regaining conciousness. Your eyes flutter");
		System.out.println ("open to the sound of a songbird, trilling joyously.");
		System.out.println ("You are lying on a couch made of green velvet, set on the");
		System.out.println ("topmost turret of a white castle hanging in the clouds.");
		System.out.println ("Rising to your feet you look around. The songbird, whose");
		System.out.println ("sleek feathers are a warm burnished gold, is perched");
		System.out.println ("on the battlements, resplendent against the ocean-blue");
		System.out.println ("canopy of a sky in which there is no sun.");
		System.out.print(TERM_ARROW);
				
				BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

				try {
					enter = br.readLine();
				} catch (IOException ioe) {
					System.out.println("IO error trying to read your name!");
				}
		System.out.println ("You are clad in strange, outlandish clothes,");
		System.out.println ("breeches of dark-green leather and a thickly quilled");
		System.out.println ("leather jerkin. On you feet are russet-red calfskin");
		System.out.println ("boots, supple and comfortaable, into which the breeches");
		System.out.println ("are tucked at mid-calf, A heavy sword is belted at your side");
		System.out.println ("and, with a shock you realise that somehow you know how to");
		System.out.println ("use it skillfully and with deadly force.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

				
		System.out.println ("As the songbird trills");
		System.out.println ("you, in vain, to recall memories of Earth but");
		System.out.println ("but everythings is hazy and distant. You have been taken");
		System.out.println ("from the world you know and trained in the art of swordplay.");
		System.out.println ("You cannot remember who trained you or why, but the hilt of");
		System.out.println ("your sword fits in your hand snugly. Drawing it, you lunge");
		System.out.println ("and parry, marveling at how the sword cuts through the air");
		System.out.println ("faster than the eye can follow.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}
				
		System.out.println ("The songbird seems unperturbed by your fine display");
		System.out.println ("of swordmanship, but you are surprised when it cocks");
		System.out.println ("its head and speaks to you, its voice fluting merrily.");
		System.out.println ("");
		System.out.println ("Welcome, Champion of Fate. Do not be dismayed, you");
		System.out.println ("are not in danger yet.");
		System.out.println ("");
		System.out.println ("Where am i? you ask, feeling as if you are in  a dream.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("Far, far away from your home, i fear to say. This is the");
		System.out.println ("world of Orb and you are in the Garden of the Gods.");
		System.out.println ("");
		System.out.println ("What is Orb? you demand.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("You will find it most strange and full of wonder,");
		System.out.println ("for it is very different from Earth. Men must share");
		System.out.println ("it with not just talking creatures such as i but");
		System.out.println ("with weird and fell monsters, giants, dragons and demons.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("There are warlocks and sorcerers, too, great wielders of");
		System.out.println ("magic, in the cities. But do not fear, you have been chosen");
		System.out.println ("to be our champion, for you are more likely to succeed than");
		System.out.println ("any other on Earth. Now i must complete my task. Come, my");
		System.out.println ("masters bid you join them in the chamber below. Please");
		System.out.println ("follow me.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}
		System.out.println ("With that the golden songbird flutters away down a");
		System.out.println ("spiral staircase. Shaking your head in confusion you");
		System.out.println ("descend the stone strps into a large circular room");
		System.out.println ("where two beings turn towards you.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}


		System.out.println ("Welcome, says one, a pale female figure enfolded in a swirling");
		System.out.println ("robe of many colours above which you can only see a perfectly");
		System.out.println ("smooth and hairless head. The robe shimmers, its colours");
		System.out.println ("shifting as she steps towards you, catching your mind before you");
		System.out.println ("realise what is happening. Looking into her face, you see");
		System.out.println ("an image of yourself, fighting for your life inside a huge");
		System.out.println ("temple. Then the image shifts and you see yourself leaving");
		System.out.println ("a walled city, hastening alone across a desolate moor,");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("only to find yourself deep in a jungle, surrounded by devils");
		System.out.println ("with blue skins. Your nape bristles as you realise that she is");
		System.out.println ("revealing glimpses of your destiny. It is only when they are");
		System.out.println ("over that you notice she has no eyes in her smooth pale face.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("The other figure changes even as you look at him. At one");
		System.out.println ("moment he is an ancient white-haired man, heavy with");
		System.out.println ("knowledge, at another an infant, wise beyond his years.");
		System.out.println ("The metamorphoses through youth to age takes but a few ");
		System.out.println ("instants, yet flows so smoothly you cannot see the features");
		System.out.println ("change. His voice is soft and ageless.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("We have summoned you here to the world of Orb because we wish");
		System.out.println ("to prevent a fatal upset in the balance of nature. The cosmic");
		System.out.println ("scales have been tipped too far and you must play a part in");
		System.out.println ("righting them. It is not for us in the Garden of the Gods to");
		System.out.println ("set things right. We cannot fight him who would bring chaos to");
		System.out.println ("Orc. Rather we use men as our tools. I shall not say wether you");
		System.out.println ("will succeed.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("The floor of the room which you are standing is the most realistic");
		System.out.println ("detailed map imaginable. You can even see small figures tilling the");
		System.out.println ("fields and walking the streets of an entire world; a world of pinnacled");
		System.out.println ("castles; knights on horseback, their men-at-arms bearing banners which");
		System.out.println ("stream in the wind; and strange high-walled cities with towers and");
		System.out.println ("spires, concealing the dives of assassins and thieves amongst the");
		System.out.println ("splendour. The eyeless immortal steps forward, her robe now the colour");
		System.out.println ("of the deep sea, and caresses your cheek.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("We are sending you down to the surface of Orb. If you fall into the");
		System.out.println ("clutches of Death we cannot aid you. Do not fail us!");
		System.out.println ("");
		System.out.println ("Fail in what? you begin to ask. But just then, to your horror, you");
		System.out.println ("find yourself being drawn inexorably towards a black crack in the map.");
		System.out.println ("The realisation that your destiny is being tampered with angers you, ");
		System.out.println ("and you resolve to find a way back to Earth and your home at any cost.");
		System.out.println ("As the world of Orb rises up to engulf you, the awesomeness of what is");
		System.out.println ("happening overwhelms you and you lose consciousness.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

	}
}
